<template>
	<view class="">
		<!-- topMenu -->
		<index-top></index-top>
		<!-- body -->
		<index-body :windowHeight="windowHeight" />
		<!-- bottom -->
		<view class="bg-dark" style="height: 0px;">
		</view>
		<!-- 提示信息弹窗 -->
		<uni-popup ref="message" type="message">
			<uni-popup-message :type="uniState.msgType" :message="uniState.messageText" :duration="2000">
			</uni-popup-message>
		</uni-popup>
		<!-- 删除提示窗示例 -->
		<uni-popup ref="alertDialog" type="dialog">
			<uni-popup-dialog :type="msgType" cancelText="我再想想" confirmText="确认" title="通知" content="确认删除吗?"
				@confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
		</uni-popup>
	</view>
</template>

<script>
	import indexTop from '@/components/index-top/index-top.vue'
	export default {
		data() {
			return {
				windowHeight: 0, //窗口的实时高度
			}
		},
		mounted() {
			// 首次加载时获取窗口高并赋值
			const wh = uni.getWindowInfo().windowHeight
			this.windowHeight = wh - 30
			// 利用uniapp的API监听窗口宽高
			const windowResizeCallback = (res) => {
				this.windowHeight = res.size.windowHeight - 30
				// console.log('变化后的窗口宽度=' + res.size.windowWidth)
				// console.log('变化后的窗口高度=' + res.size.windowHeight)
			}
			uni.onWindowResize(windowResizeCallback)
		}
	}
</script>

<style>

</style>
